[PATCH 1/2] lib/pty: Put master PTY into non-blocking mode and buffer its output to avoid deadlock
If we filled the script->child buffer before the child had a chance to read any
input, we'd sleep forever in write_all(pty->master), and the child would sleep
forever in write(1<pty->slave>)
By putting the master PTY in non-blocking mode, we can poll(pty->master,
POLLOUT) and keep supplying more data as the child reads from the buffer
Fixes Debian bug #
1003095
Signed-off-by: Karel Zak <kzak@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name PATCH-1-2-lib-pty-Put-master-PTY-into-non-blocking-mode-a.patch